import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:leader_help/page/task/subs/make_plan/widgets/widgets.dart';
import '../index.dart';
import 'package:leader_help/utils/util.dart';

class QuestionDetailAimCell extends GetView<QuestionDetailController> {
  const QuestionDetailAimCell({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GetBuilder<QuestionDetailController>(
      builder: (_) => Container(
        padding: EdgeInsets.symmetric(horizontal: 12.r),
        child: Column(
          children: [
            controller.state.planMod == null
                ? Text(
                    '省财政厅、省工信厅、省商务厅已制定并提交针对此问题的目标及方案。',
                    style:
                        pfMediumStyle(color: ColorsUtil.red, fontSize: 13.sp),
                  )
                : Container(
                    decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(2),
                        border: Border.all(color: ColorsUtil.bg, width: 4.r)),
                    child: PlanCell(
                      canChoose: false,
                      mod: controller.state.planMod!,
                      cellTap: controller.actionCell,
                    ),
                  ),
            InkWell(
              onTap: controller.actionMakePlan,
              child: Container(
                height: 40.r,
                width: Get.width,
                margin: EdgeInsets.symmetric(vertical: 10.r),
                alignment: Alignment.center,
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(20.r),
                  border: Border.all(color: ColorsUtil.red),
                ),
                child: Text(
                  controller.state.planMod == null ? '查看并定方案' : '调措施',
                  style: pfSCStyle(color: ColorsUtil.red, fontSize: 15.sp),
                ),
              ),
            )
          ],
        ),
      ),
    );
  }
}
